main{
  mainClassLoader=Thread.currentThread().getContextClassLoader();
}
readArguments{ }
readPluginDirArgument{
  for (int i=0; i < args.length; i++) {
    if (ARG_PLUGIN_DIR.equals(args[i]) && i + 1 < args.length) {
      System.setProperty(PROP_PLUGIN_DIR,args[i + 1]);
}
readEvaluateArgument{
  for (int i=0; i < args.length; i++) {
    if (ARG_EVALUATE.equals(args[i]) && i + 1 < args.length) {
      System.setProperty(PROP_EVALUATE,args[i + 1]);
}
init{
    currentShell=new Thread(new Runnable(){
        boolean restarting=restartRequested;
        Weld weld=new ModularWeld();
        BeanManager manager=null;
        try {
          WeldContainer container=weld.initialize();
          manager=container.getBeanManager();
 catch (        Exception e) {
        try {
          WeldContainer container=weld.initialize();
          manager=container.getBeanManager();
 catch (        Throwable e) {
          e.printStackTrace();
          WeldContainer container=weld.initialize();
          manager=container.getBeanManager();
        try {
          manager.fireEvent(new PreStartup());
 catch (        Throwable t) {
        try {
          manager.fireEvent(new Startup(workingDir,restarting));
 catch (        Throwable t) {
        try {
          manager.fireEvent(new PostStartup());
 catch (        Throwable t) {
        try {
          manager.fireEvent(new AcceptUserInput());
 catch (        Throwable t) {
    try {
 catch (    InterruptedException e) {
      throw new RuntimeException(e);
}
run{
  Weld weld=new ModularWeld();
  BeanManager manager=null;
  try {
    WeldContainer container=weld.initialize();
    manager=container.getBeanManager();
  try {
    WeldContainer container=weld.initialize();
    manager=container.getBeanManager();
 catch (  Throwable e) {
    e.printStackTrace();
    WeldContainer container=weld.initialize();
    manager=container.getBeanManager();
  try {
    manager.fireEvent(new PreStartup());
 catch (  Throwable t) {
  try {
    manager.fireEvent(new Startup(workingDir,restarting));
 catch (  Throwable t) {
    manager.fireEvent(new PostStartup());
 catch (  Throwable t) {
    manager.fireEvent(new AcceptUserInput());
 catch (  Throwable t) {
}
observeReinitialize{
  workingDir=shell.getCurrentDirectory().getUnderlyingResourceObject();
  manager.fireEvent(new Shutdown());
}
initLogging{
  String[] loggerNames=new String[]{"","main",Logger.GLOBAL_LOGGER_NAME};
  for (  String loggerName : loggerNames) {
    Logger globalLogger=Logger.getLogger(loggerName);
    Handler[] handlers=globalLogger.getHandlers();
    for (    Handler handler : handlers) {
      handler.setLevel(Level.SEVERE);
      globalLogger.removeHandler(handler);
}
loadPlugins{
  try {
    ModuleLoader moduleLoader=Module.getBootModuleLoader();
    CompositeClassLoader composite=new CompositeClassLoader();
    composite.add(Module.forClassLoader(Bootstrap.class.getClassLoader(),true).getClassLoader());
    List<PluginEntry> toLoad=new ArrayList<PluginEntry>();
    List<PluginEntry> installed=InstalledPluginRegistry.listByAPICompatibleVersion(InstalledPluginRegistry.getRuntimeAPIVersion());
    toLoad.addAll(installed);
    List<PluginEntry> incompatible=InstalledPluginRegistry.list();
    incompatible.removeAll(installed);
    for (    PluginEntry pluginEntry : incompatible) {
      try {
        Module module=moduleLoader.loadModule(ModuleIdentifier.fromString(plugin.toModuleId()));
        composite.add(module.getClassLoader());
 catch (      Exception e) {
        e.printStackTrace();
    Thread.currentThread().setContextClassLoader(composite);
 catch (  Exception e) {
    e.printStackTrace();
}
